set :deploy_to, "/root/www/02.jadejade.cn"
#set :deploy_to, "/home/musicstory/rails"
role :app, "117.21.225.171"
role :web, "117.21.225.171"
role :db,  "117.21.225.171", :primary => true
default_run_options[:pty] = true


namespace :deploy do
  desc <<-DESC
  Restart the application altering tmp/restart.txt for mod_rails.
  DESC
  task :restart, :roles => :app do
    run "cp /root/www/02.jadejade.cn/shared/database.yml /root/www/02.jadejade.cn/current/config/."
    run "touch  #{File.join(deploy_to, current_dir)}/tmp/restart.txt"
  end
end
after "deploy", "deploy:cleanup"
#namespace :deploy do
#  %w(start restart).each { |name| task name, :roles => :app do mod_rails.restart end }
#  %w(start restart).each { |name| task name, :roles => :app do mod_rails.restart end }
#end

